//
//  FKImageTextCell.m
//  HappyTest
//
//  Created by Macbook Pro on 2019/2/16.
//  Copyright © 2019 Macbook Pro. All rights reserved.
//

#import "FKImageTextCell.h"

@interface FKImageTextCell ()<UIWebViewDelegate>


@end

@implementation FKImageTextCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
//        [self setupSubviews];
    }
    return self;
}

- (void)setWebView:(UIWebView *)webView
{
//    if (!_webView) {
        _webView = webView;
        [self.contentView addSubview:webView];
        [webView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.offset(0);
        }];
//    }
}


//- (void)setupSubviews
//{
//    UIWebView *webView = [[UIWebView alloc] init];
//    [self.contentView addSubview:webView];
//    self.webView = webView;
//    webView.delegate = self;
//    webView.backgroundColor = [UIColor redColor];
////    webView.frame = CGRectMake(0, 0, fkScreenW, 0.01);
//    [webView mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.edges.offset(0);
//    }];
//}

//#pragma mark - UIWebViewDelegate
//- (void)webViewDidFinishLoad:(UIWebView *)webView
//{
//    CGFloat webviewH = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight"] floatValue];
//    self.webView.fk_height = webviewH;
//    if ([self.delegate respondsToSelector:@selector(imageTextCellDidUpdateCell:)]) {
//        [self.delegate imageTextCellDidUpdateCell:webviewH];
//    }
//}

//- (void)setUrl:(NSString *)url
//{
//    _url = url;
//    
//    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
//}


@end
